local Protect_drawNcards = fk.CreateSkill {
  name = "#Protect_drawNcards",
  tags = { Skill.Compulsory },
}

local white_package_extensionName = {"test","standard_ex","yj","sp","ol","tenyear","mougong","mobile","overseas","jsrg","mini","tuguo","qsgs","offline","wdls","lunar","sxrm","brainhole_new" }

Protect_drawNcards:addEffect(fk.BeforeDrawCard, {
  mute = true,
  global = true,
  priority = 0.1,
  can_trigger = function(self, event, target, player, data)
    return target == player and data.who == player and data.num > 20
  end,
  on_use = function(self, event, target, player, data)
    local skill = Fk.skills[data.skillName]
    if table.contains(white_package_extensionName, skill.package.extensionName) then
      player.room:doBroadcastNotify("ShowToast", "神临doro：你受到了白名单的保护！" .. Fk:translate(player.general) .. "你别再摸牌了，停手吧！")
    else
      player.room:doBroadcastNotify("ShowToast", "博丽灵梦：狐狸服专属摸牌异变！" .. Fk:translate(player.general) .. "的牌实在是太多了，削弱摸牌数量")
      data.num = 20
    end
  end
})

return Protect_drawNcards

